﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Innova.Entites;
using Innova.Repository;
using Microsoft.Practices.Unity;

namespace Innova.BusinessLogic
{
    public class NewsBL : INewsBL
    {
        [Dependency]
        public INewsRepository newsRepository { get; set; }

        public List<NEWS> GetAllFromNews()
        {
            return newsRepository.GetAllFromNews();
        }

        public List<NEWS> GetFromNewsByDescripcion(string descripcion)
        {
            return newsRepository.GetFromNewsByDescripcion(descripcion);
        }

        public List<NEWS> GetFromNewsByPatrocinadorId(int PatrocinadorId)
        {
            return newsRepository.GetFromNewsByPatrocinadorId(PatrocinadorId);
        }

        public NEWS GetFromNewsById(int id)
        {
            return newsRepository.GetFromNewsById(id);
        }

        public void AddNews(NEWS news)
        {
            throw new NotImplementedException();
        }

        public void UpdateNews(NEWS news)
        {
            throw new NotImplementedException();
        }

        public void RemoveNews(int id)
        {
            throw new NotImplementedException();
        }


        public byte[] GetFotoByNewsId(int id)
        {
            return newsRepository.GetFotoByNewsId(id);
        }
    }
}
